package com.shadow.mall.pay.remote;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.shadow.mall.common.core.JsonResult;
import com.shadow.mall.order.domain.request.RefundCallbackRequest;
import com.shadow.mall.pay.exception.PayBizException;
import com.shadow.mall.pay.remote.fallback.AfterSaleRemoteFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;

@Component
@FeignClient("shadow-mall-order")
public interface AfterSaleService {

//    @SentinelResource(value = "AfterSaleRemote:refundCallback", fallbackClass = AfterSaleRemoteFallback.class, fallback = "refundCallbackFallback")
    /**
     * 取消订单支付退款回调
     */
    @PostMapping("/afterSale/refundCallback")
    JsonResult<Boolean> refundCallback(RefundCallbackRequest payRefundCallbackRequest);
}
